let ul = document.querySelector('ul')
let productid = getQueryString('productid')


const xhr1 = new XMLHttpRequest()
xhr1.open("get",`http://chst.vip:1234/api/getmoneyctrlproduct?productid=${productid}`)
xhr1.onload = function(){
    if(xhr1.status === 200){
        res1 = JSON.parse(xhr1.responseText)
        console.log(res1);
        let reso = res1.result
        console.log(reso)
        let regExp = /(?<=imgurl=)[^'"]*/;
        let imgSm = reso[0].productImgSm.match(regExp)



        let lis = ''
        
        ul.innerHTML =  `
        <li productid = ${reso.productId}>
                <div>
                    <div class = "bt">
                        <h4>${reso[0].productName}</h4>
                    </div>


                    <div class = "jdsj">
                        <span>${reso[0].productFrom}${reso[0].productTime}</span>
                        <span>${reso[0].productTips}</span>
                    </div>


                    <div class = "thz">
                        <p>
                            <img src="${imgSm}" alt="">
                            ${reso[0].productInfo}
                            ${reso[0].productInfo1}
                        </p>
                    </div>


                    <div>
                    <img src="${imgSm}" alt="">
                    </div>


                    <div>
                        <ul>
                            <li>
                                <a href="#">
                                <span>
                                        ${reso[0].productCity}
                                    </span>
                                </a>
                            </li>
                        </ul>
                    </div>
                </div>
            </li>
        `
        
        
        
    }
}
xhr1.send(null)